package com.hunterai.comfyui;

import org.springframework.http.MediaType;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ImageResponse {
    private byte[] imageData;
    private MediaType mediaType;
    private String error;

    public ImageResponse(byte[] imageData, MediaType mediaType) {
        this.imageData = imageData;
        this.mediaType = mediaType;
        this.error = null;
    }

    public static ImageResponse error(String message) {
        return new ImageResponse(null, null, message);
    }
}